<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="baseUrl" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加账单</title>
<link type="text/css" rel="stylesheet" href="${baseUrl }/css/style.css" />
<script type="text/javascript" src="${baseUrl }/js/jquery-3.3.1.js"></script>

<script type="text/javascript">
	$(function(){
		var payStatus = ${bill.ispay}
		$("select option").each(function(){
			if($(this).val()==payStatus){
				$(this).attr("selected",true)
			}
		})
	})
</script>


</head>
<body>
<div class="main">
	<form method="post">
		<div class="content">
			<table class="box">
				<tr>
					<td class="field">账单编号：</td>
					<td><input type="text" name="id" class="text" value="${bill.id }" readonly="readonly"/></td>
				</tr>
				<tr>
					<td class="field">账单名称：</td>
					<td><input type="text" name="name" class="text" value="${bill.name }"/></td>
				</tr>
				<tr>
					<td class="field">账单描述：</td>
					<td><input type="text" name="desc" class="text" value="${bill.desc }"/></td>
				</tr>
				<tr>
					<td class="field">账单时间：</td>
					<td><input type="text" name="time" class="text" value="${bill.time }"/></td>
				</tr>
				<tr>
					<td class="field">账单报价：</td>
					<td><input type="text" name="money" class="text" value="${bill.money }"/></td>
				</tr>
				<tr>
					<td class="field">数量：</td>
					<td><input type="text" name="counts" class="text" value="${bill.counts }"/></td>
				</tr>
				<tr>
					<td class="field">供应商编号：</td>
					<td><input type="text" name="providerId" class="text" value="${bill.providerId }"/></td>
				</tr>
				<tr>
					<td class="field">是否付款：</td>
					<td><select name="payStatus" id="select">
						<option value=>请选择</option>
						<option value="1">是</option>
						<option value="0">没有</option>
					</select></td>
				</tr>
			</table>
		</div>
		<div class="buttons">
			<input type="submit" name="submit" value="确认" class="input-button" />
			<input type="button" name="button" value="返回" class="input-button" onclick="history.back();" />
		</div>
	</form>
</div>
</body>
</html>
